.class public Lcom/xunlei/cloud/action/search/g;
.super Ljava/lang/Object;
.source "SnifferParser.java"


# static fields
.field public static a:Lcom/xunlei/cloud/util/af;


# direct methods
.method static constructor <clinit>()V
    .locals 2

    .prologue
    .line 28
    new-instance v0, Lcom/xunlei/cloud/util/af;

    const-class v1, Lcom/xunlei/cloud/action/search/g;

    invoke-direct {v0, v1}, Lcom/xunlei/cloud/util/af;-><init>(Ljava/lang/Class;)V

    sput-object v0, Lcom/xunlei/cloud/action/search/g;->a:Lcom/xunlei/cloud/util/af;

    .line 213
    return-void
.end method

.method public constructor <init>()V
    .locals 0

    .prologue
    .line 27
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method private static a(Ljava/lang/String;I)Ljava/lang/String;
    .locals 3
    .parameter
    .parameter

    .prologue
    .line 366
    new-instance v0, Ljava/util/Locale;

    const-string v1, "en"

    const-string v2, "US"

    invoke-direct {v0, v1, v2}, Ljava/util/Locale;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    .line 367
    packed-switch p1, :pswitch_data_0

    .line 380
    :goto_0
    return-object p0

    .line 369
    :pswitch_0
    invoke-virtual {p0, v0}, Ljava/lang/String;->toUpperCase(Ljava/util/Locale;)Ljava/lang/String;

    move-result-object p0

    goto :goto_0

    .line 373
    :pswitch_1
    invoke-virtual {p0, v0}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;

    move-result-object p0

    goto :goto_0

    .line 367
    nop

    :pswitch_data_0
    .packed-switch 0x1
        :pswitch_0
        :pswitch_1
    .end packed-switch
.end method

.method private static a(Ljava/lang/String;II)Ljava/lang/String;
    .locals 2
    .parameter
    .parameter
    .parameter

    .prologue
    .line 318
    add-int/lit8 v0, p1, 0x0

    .line 319
    invoke-virtual {p0}, Ljava/lang/String;->length()I

    move-result v1

    sub-int/2addr v1, p2

    .line 320
    if-le v0, v1, :cond_0

    .line 321
    const/4 v0, 0x0

    .line 325
    :goto_0
    return-object v0

    .line 324
    :cond_0
    invoke-virtual {p0, v0, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v0

    goto :goto_0
.end method

.method private static a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    .locals 2
    .parameter
    .parameter
    .parameter

    .prologue
    .line 312
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    .line 313
    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    .line 314
    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method private static a(Ljava/lang/String;ZLjava/lang/String;ZZLjava/lang/String;Z)Ljava/lang/String;
    .locals 4
    .parameter
    .parameter
    .parameter
    .parameter
    .parameter
    .parameter
    .parameter

    .prologue
    const/4 v2, 0x0

    const/4 v0, 0x0

    const/4 v3, -0x1

    .line 332
    if-eqz p1, :cond_1

    .line 345
    :cond_0
    :goto_0
    const-string v1, ""

    .line 346
    if-eqz p4, :cond_2

    .line 347
    invoke-virtual {p2}, Ljava/lang/String;->length()I

    move-result v1

    add-int/2addr v0, v1

    invoke-virtual {p0, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    .line 361
    :goto_1
    return-object v0

    .line 335
    :cond_1
    invoke-virtual {p0, p2}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v1

    .line 336
    if-ne v1, v3, :cond_5

    .line 337
    if-eqz p3, :cond_0

    move-object v0, v2

    .line 338
    goto :goto_1

    .line 349
    :cond_2
    invoke-virtual {p0, p5, v0}, Ljava/lang/String;->indexOf(Ljava/lang/String;I)I

    move-result v1

    .line 350
    if-ne v1, v3, :cond_4

    .line 351
    if-eqz p6, :cond_3

    move-object v0, v2

    .line 352
    goto :goto_1

    .line 354
    :cond_3
    invoke-virtual {p2}, Ljava/lang/String;->length()I

    move-result v1

    add-int/2addr v0, v1

    invoke-virtual {p0, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v0

    goto :goto_1

    .line 357
    :cond_4
    invoke-virtual {p2}, Ljava/lang/String;->length()I

    move-result v2

    add-int/2addr v0, v2

    invoke-virtual {p0, v0, v1}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v0

    goto :goto_1

    :cond_5
    move v0, v1

    goto :goto_0
.end method

.method private static a(Lorg/jsoup/nodes/Element;Lcom/xunlei/cloud/action/search/SnifferField0;)Ljava/lang/String;
    .locals 9
    .parameter
    .parameter
    .annotation build Landroid/annotation/SuppressLint;
        value = {
            "UseSparseArrays"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/NoSuchMethodException;,
            Ljava/lang/IllegalArgumentException;,
            Ljava/lang/IllegalAccessException;,
            Ljava/lang/reflect/InvocationTargetException;
        }
    .end annotation

    .prologue
    const/4 v7, 0x0

    const/4 v8, 0x1

    const/4 v6, 0x0

    .line 219
    const-class v1, Lorg/jsoup/nodes/Element;

    .line 223
    iget-object v0, p1, Lcom/xunlei/cloud/action/search/SnifferField0;->extract_opera:Ljava/lang/String;

    .line 224
    iget-object v2, p1, Lcom/xunlei/cloud/action/search/SnifferField0;->extract_para:Ljava/lang/String;

    .line 225
    invoke-virtual {v2}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/String;->length()I

    move-result v3

    if-nez v3, :cond_1

    .line 226
    new-array v3, v6, [Ljava/lang/Class;

    invoke-virtual {v1, v0, v3}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;

    move-result-object v0

    .line 227
    new-array v3, v6, [Ljava/lang/Object;

    invoke-virtual {v0, p0, v3}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lorg/jsoup/select/Elements;

    .line 233
    :goto_0
    invoke-virtual {v0}, Lorg/jsoup/select/Elements;->size()I

    move-result v3

    if-eq v3, v8, :cond_2

    .line 234
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "[extractString] elementList.size() != 1, getElementPara = "

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/xunlei/cloud/action/search/g;->e(Ljava/lang/String;)V

    move-object v0, v7

    .line 308
    :cond_0
    :goto_1
    return-object v0

    .line 229
    :cond_1
    new-array v3, v8, [Ljava/lang/Class;

    const-class v4, Ljava/lang/String;

    aput-object v4, v3, v6

    invoke-virtual {v1, v0, v3}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;

    move-result-object v0

    .line 230
    new-array v3, v8, [Ljava/lang/Object;

    aput-object v2, v3, v6

    invoke-virtual {v0, p0, v3}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lorg/jsoup/select/Elements;

    goto :goto_0

    .line 239
    :cond_2
    invoke-virtual {v0}, Lorg/jsoup/select/Elements;->first()Lorg/jsoup/nodes/Element;

    move-result-object v0

    .line 243
    iget-object v2, p1, Lcom/xunlei/cloud/action/search/SnifferField0;->element_data_opera:Ljava/lang/String;

    .line 244
    iget-object v3, p1, Lcom/xunlei/cloud/action/search/SnifferField0;->element_data_para:Ljava/lang/String;

    .line 245
    invoke-virtual {v3}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/String;->length()I

    move-result v4

    if-nez v4, :cond_4

    .line 246
    new-array v3, v6, [Ljava/lang/Class;

    invoke-virtual {v1, v2, v3}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;

    move-result-object v1

    .line 247
    new-array v2, v6, [Ljava/lang/Object;

    invoke-virtual {v1, v0, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    .line 252
    :goto_2
    if-eqz v0, :cond_3

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v1

    if-nez v1, :cond_5

    :cond_3
    move-object v0, v7

    .line 253
    goto :goto_1

    .line 249
    :cond_4
    new-array v4, v8, [Ljava/lang/Class;

    const-class v5, Ljava/lang/String;

    aput-object v5, v4, v6

    invoke-virtual {v1, v2, v4}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;

    move-result-object v1

    .line 250
    new-array v2, v8, [Ljava/lang/Object;

    aput-object v3, v2, v6

    invoke-virtual {v1, v0, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/String;

    goto :goto_2

    .line 258
    :cond_5
    new-instance v1, Ljava/util/HashMap;

    invoke-direct {v1}, Ljava/util/HashMap;-><init>()V

    .line 259
    iget v2, p1, Lcom/xunlei/cloud/action/search/SnifferField0;->order_trim:I

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    const-string v3, "order_trim"

    invoke-interface {v1, v2, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 260
    iget v2, p1, Lcom/xunlei/cloud/action/search/SnifferField0;->order_append:I

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    const-string v3, "order_append"

    invoke-interface {v1, v2, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 261
    iget v2, p1, Lcom/xunlei/cloud/action/search/SnifferField0;->order_middle:I

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    const-string v3, "order_middle"

    invoke-interface {v1, v2, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 262
    iget v2, p1, Lcom/xunlei/cloud/action/search/SnifferField0;->order_case:I

    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    const-string v3, "order_case"

    invoke-interface {v1, v2, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 263
    new-instance v2, Ljava/util/TreeMap;

    invoke-direct {v2, v1}, Ljava/util/TreeMap;-><init>(Ljava/util/Map;)V

    .line 264
    invoke-interface {v2}, Ljava/util/Map;->entrySet()Ljava/util/Set;

    move-result-object v1

    invoke-interface {v1}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v8

    :cond_6
    :goto_3
    invoke-interface {v8}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_0

    invoke-interface {v8}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/util/Map$Entry;

    .line 268
    invoke-interface {v1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Ljava/lang/Integer;

    invoke-virtual {v2}, Ljava/lang/Integer;->intValue()I

    move-result v2

    const/4 v3, -0x1

    if-eq v2, v3, :cond_6

    .line 272
    invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/String;

    .line 273
    const-string v2, "order_trim"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_7

    .line 275
    iget v1, p1, Lcom/xunlei/cloud/action/search/SnifferField0;->element_data_trim_num_head:I

    iget v2, p1, Lcom/xunlei/cloud/action/search/SnifferField0;->element_data_trim_num_tail:I

    invoke-static {v0, v1, v2}, Lcom/xunlei/cloud/action/search/g;->a(Ljava/lang/String;II)Ljava/lang/String;

    move-result-object v0

    .line 277
    if-nez v0, :cond_6

    .line 278
    const-string v0, "[extractString] after trim data = null"

    invoke-static {v0}, Lcom/xunlei/cloud/action/search/g;->e(Ljava/lang/String;)V

    move-object v0, v7

    .line 279
    goto/16 :goto_1

    .line 281
    :cond_7
    const-string v2, "order_append"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_8

    .line 283
    iget-object v1, p1, Lcom/xunlei/cloud/action/search/SnifferField0;->element_data_append_head:Ljava/lang/String;

    iget-object v2, p1, Lcom/xunlei/cloud/action/search/SnifferField0;->element_data_append_tail:Ljava/lang/String;

    invoke-static {v0, v1, v2}, Lcom/xunlei/cloud/action/search/g;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 285
    if-nez v0, :cond_6

    .line 286
    const-string v0, "[extractString] after add data == null"

    invoke-static {v0}, Lcom/xunlei/cloud/action/search/g;->e(Ljava/lang/String;)V

    move-object v0, v7

    .line 287
    goto/16 :goto_1

    .line 289
    :cond_8
    const-string v2, "order_middle"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_b

    .line 292
    iget-object v2, p1, Lcom/xunlei/cloud/action/search/SnifferField0;->extract_middle_head:Ljava/lang/String;

    .line 293
    iget-object v5, p1, Lcom/xunlei/cloud/action/search/SnifferField0;->extract_middle_tail:Ljava/lang/String;

    .line 294
    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v1

    if-nez v1, :cond_9

    invoke-virtual {v5}, Ljava/lang/String;->length()I

    move-result v1

    if-eqz v1, :cond_a

    .line 295
    :cond_9
    iget-boolean v1, p1, Lcom/xunlei/cloud/action/search/SnifferField0;->extract_middle_from_begin:Z

    iget-boolean v3, p1, Lcom/xunlei/cloud/action/search/SnifferField0;->extract_middle_head_must:Z

    .line 296
    iget-boolean v4, p1, Lcom/xunlei/cloud/action/search/SnifferField0;->extract_middle_until_end:Z

    iget-boolean v6, p1, Lcom/xunlei/cloud/action/search/SnifferField0;->extract_middle_tail_must:Z

    .line 295
    invoke-static/range {v0 .. v6}, Lcom/xunlei/cloud/action/search/g;->a(Ljava/lang/String;ZLjava/lang/String;ZZLjava/lang/String;Z)Ljava/lang/String;

    move-result-object v0

    .line 298
    :cond_a
    if-nez v0, :cond_6

    .line 299
    const-string v0, "[extractString] after middle data == null"

    invoke-static {v0}, Lcom/xunlei/cloud/action/search/g;->e(Ljava/lang/String;)V

    move-object v0, v7

    .line 300
    goto/16 :goto_1

    .line 302
    :cond_b
    const-string v2, "order_case"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_6

    .line 304
    iget v1, p1, Lcom/xunlei/cloud/action/search/SnifferField0;->the_case:I

    invoke-static {v0, v1}, Lcom/xunlei/cloud/action/search/g;->a(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v0

    goto/16 :goto_3
.end method

.method public static a(Lcom/xunlei/cloud/action/search/Sniffer;Ljava/lang/String;)Ljava/util/ArrayList;
    .locals 9
    .parameter
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/xunlei/cloud/action/search/Sniffer;",
            "Ljava/lang/String;",
            ")",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/xunlei/cloud/action/search/SnifferData;",
            ">;"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/io/IOException;,
            Ljava/lang/NoSuchMethodException;,
            Ljava/lang/IllegalArgumentException;,
            Ljava/lang/IllegalAccessException;,
            Ljava/lang/reflect/InvocationTargetException;,
            Ljava/lang/NoSuchFieldException;,
            Ljava/lang/SecurityException;
        }
    .end annotation

    .prologue
    const/4 v7, 0x1

    const/4 v6, 0x0

    .line 162
    new-instance v3, Ljava/util/ArrayList;

    invoke-direct {v3}, Ljava/util/ArrayList;-><init>()V

    .line 165
    invoke-static {p1}, Lorg/jsoup/Jsoup;->parse(Ljava/lang/String;)Lorg/jsoup/nodes/Document;

    move-result-object v0

    .line 167
    const-class v1, Lorg/jsoup/nodes/Document;

    .line 168
    iget-object v2, p0, Lcom/xunlei/cloud/action/search/Sniffer;->select_row_opera_0:Ljava/lang/String;

    new-array v4, v7, [Ljava/lang/Class;

    const-class v5, Ljava/lang/String;

    aput-object v5, v4, v6

    invoke-virtual {v1, v2, v4}, Ljava/lang/Class;->getMethod(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;

    move-result-object v1

    .line 169
    new-array v2, v7, [Ljava/lang/Object;

    iget-object v4, p0, Lcom/xunlei/cloud/action/search/Sniffer;->select_row_para_0:Ljava/lang/String;

    aput-object v4, v2, v6

    invoke-virtual {v1, v0, v2}, Ljava/lang/reflect/Method;->invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lorg/jsoup/select/Elements;

    .line 171
    invoke-virtual {v0}, Lorg/jsoup/select/Elements;->size()I

    move-result v1

    if-nez v1, :cond_0

    .line 172
    const-string v0, "[parser0] rowList.size() == 0"

    invoke-static {v0}, Lcom/xunlei/cloud/action/search/g;->e(Ljava/lang/String;)V

    move-object v0, v3

    .line 207
    :goto_0
    return-object v0

    .line 176
    :cond_0
    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "[parser0] \u627e\u591a\u5c11\u884c\u9700\u8981\u89e3\u6790 = "

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v0}, Lorg/jsoup/select/Elements;->size()I

    move-result v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Lcom/xunlei/cloud/action/search/g;->e(Ljava/lang/String;)V

    .line 178
    invoke-virtual {v0}, Lorg/jsoup/select/Elements;->iterator()Ljava/util/Iterator;

    move-result-object v4

    :cond_1
    :goto_1
    invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-nez v0, :cond_2

    .line 205
    new-instance v0, Ljava/lang/StringBuilder;

    const-string v1, "[parser0] \u55c5\u63a2\u51fa\u7684\u4e2a\u6570\u662f\uff1a "

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3}, Ljava/util/ArrayList;->size()I

    move-result v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/xunlei/cloud/action/search/g;->e(Ljava/lang/String;)V

    move-object v0, v3

    .line 207
    goto :goto_0

    .line 178
    :cond_2
    invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lorg/jsoup/nodes/Element;

    .line 179
    new-instance v5, Lcom/xunlei/cloud/action/search/SnifferData;

    invoke-direct {v5}, Lcom/xunlei/cloud/action/search/SnifferData;-><init>()V

    .line 180
    const-class v6, Lcom/xunlei/cloud/action/search/SnifferData;

    .line 182
    iget-object v1, p0, Lcom/xunlei/cloud/action/search/Sniffer;->field_list_0:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v7

    :cond_3
    :goto_2
    invoke-interface {v7}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-nez v1, :cond_4

    .line 199
    iget-object v0, v5, Lcom/xunlei/cloud/action/search/SnifferData;->url:Ljava/lang/String;

    if-eqz v0, :cond_1

    iget-object v0, v5, Lcom/xunlei/cloud/action/search/SnifferData;->url:Ljava/lang/String;

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v0

    if-eqz v0, :cond_1

    iget-object v0, v5, Lcom/xunlei/cloud/action/search/SnifferData;->hash:Ljava/lang/String;

    if-eqz v0, :cond_1

    iget-object v0, v5, Lcom/xunlei/cloud/action/search/SnifferData;->hash:Ljava/lang/String;

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v0

    if-eqz v0, :cond_1

    .line 200
    invoke-virtual {v3, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_1

    .line 182
    :cond_4
    invoke-interface {v7}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/xunlei/cloud/action/search/SnifferField0;

    .line 184
    invoke-static {v0, v1}, Lcom/xunlei/cloud/action/search/g;->a(Lorg/jsoup/nodes/Element;Lcom/xunlei/cloud/action/search/SnifferField0;)Ljava/lang/String;

    move-result-object v2

    .line 185
    if-eqz v2, :cond_3

    .line 190
    iget-object v8, v1, Lcom/xunlei/cloud/action/search/SnifferField0;->class_field_name:Ljava/lang/String;

    const-string v9, "title"

    invoke-virtual {v8, v9}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v8

    if-eqz v8, :cond_5

    .line 191
    invoke-static {v2}, Lcom/xunlei/cloud/action/search/g;->d(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    .line 194
    :cond_5
    iget-object v1, v1, Lcom/xunlei/cloud/action/search/SnifferField0;->class_field_name:Ljava/lang/String;

    invoke-virtual {v6, v1}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field;

    move-result-object v1

    .line 195
    invoke-virtual {v1, v5, v2}, Ljava/lang/reflect/Field;->set(Ljava/lang/Object;Ljava/lang/Object;)V

    goto :goto_2
.end method

.method public static a(Ljava/lang/String;)Ljava/util/ArrayList;
    .locals 15
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            ")",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/xunlei/cloud/action/search/SnifferData;",
            ">;"
        }
    .end annotation

    .prologue
    const/4 v2, 0x1

    const/4 v3, 0x0

    .line 77
    new-instance v4, Ljava/util/ArrayList;

    invoke-direct {v4}, Ljava/util/ArrayList;-><init>()V

    .line 79
    const-string v0, ".*?</br>"
    
    const/4 v10, 0x0
    const/16 v11, 0x3c
    const/16 v12, 0x3d

    const/4 v1, 0x2

    invoke-static {v0, v1}, Ljava/util/regex/Pattern;->compile(Ljava/lang/String;I)Ljava/util/regex/Pattern;

    move-result-object v0
    


    .line 80
    invoke-virtual {v0, p0}, Ljava/util/regex/Pattern;->matcher(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;

    move-result-object v5

    .line 81
    :cond_0
    :goto_0
    invoke-virtual {v5}, Ljava/util/regex/Matcher;->find()Z

    move-result v0

    if-nez v0, :cond_1

    .line 112
    return-object v4

    .line 86
    :cond_1
    invoke-virtual {v5}, Ljava/util/regex/Matcher;->group()Ljava/lang/String;

    move-result-object v0

    .line 88
    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v1

    add-int/lit8 v1, v1, -0x1

    invoke-virtual {v0, v1}, Ljava/lang/String;->charAt(I)C

    move-result v1

    .line 89
    const/16 v6, 0x26

    if-ne v1, v6, :cond_4

    .line 90
    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v1

     

    invoke-virtual {v0, v10, v11}, Ljava/lang/String;->substring(II)Ljava/lang/String;
    
    move-result-object v8
    move-object v1, v8

    .line 92
    :goto_1
    move-object v9, v0
    const/16 v0, 0x14

    invoke-virtual {v1}, Ljava/lang/String;->length()I

    move-result v6

    invoke-virtual {v1, v0, v11}, Ljava/lang/String;->substring(II)Ljava/lang/String;

    move-result-object v0
    
    invoke-static {v0, v2}, Lcom/xunlei/cloud/action/search/g;->a(Ljava/lang/String;I)Ljava/lang/String;

    move-result-object v6

  

    .line 96
    invoke-virtual {v4}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v7

    :cond_2
    invoke-interface {v7}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-nez v0, :cond_3

    move v0, v3

    .line 103
    :goto_2
    if-nez v0, :cond_0

    .line 104
    new-instance v0, Lcom/xunlei/cloud/action/search/SnifferData;

    invoke-direct {v0}, Lcom/xunlei/cloud/action/search/SnifferData;-><init>()V
    
    invoke-virtual {v9}, Ljava/lang/String;->length()I
    move-result v13
    add-int/lit8 v13, v13, -0x5
    
    invoke-virtual {v9, v12, v13}, Ljava/lang/String;->substring(II)Ljava/lang/String;
    move-result-object v14
   
     
    .line 105
    iput-object v6, v0, Lcom/xunlei/cloud/action/search/SnifferData;->title:Ljava/lang/String;

    .line 106
    iput-object v1, v0, Lcom/xunlei/cloud/action/search/SnifferData;->url:Ljava/lang/String;

    .line 107
    iput-object v6, v0, Lcom/xunlei/cloud/action/search/SnifferData;->hash:Ljava/lang/String;

    .line 108
    invoke-virtual {v4, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_0

    .line 96
    :cond_3
    invoke-interface {v7}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/xunlei/cloud/action/search/SnifferData;

    .line 97
    iget-object v0, v0, Lcom/xunlei/cloud/action/search/SnifferData;->hash:Ljava/lang/String;

    invoke-virtual {v0, v6}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_2

    move v0, v2

    .line 99
    goto :goto_2

    :cond_4
    move-object v1, v0

    goto :goto_1
.end method

.method public static a(Ljava/lang/String;Lcom/xunlei/cloud/action/search/Sniffer;)Ljava/util/ArrayList;
    .locals 3
    .parameter
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            "Lcom/xunlei/cloud/action/search/Sniffer;",
            ")",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/xunlei/cloud/action/search/SnifferData;",
            ">;"
        }
    .end annotation

    .prologue
    const/4 v0, 0x0

    .line 47
    .line 49
    :try_start_0
    iget v1, p1, Lcom/xunlei/cloud/action/search/Sniffer;->sniffer_id:I

    packed-switch v1, :pswitch_data_0

    .line 63
    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "\u51fa\u9519\uff0c\u672c\u7248\u672c\u6ca1\u6709\u55c5\u63a2\u5668("

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget v2, p1, Lcom/xunlei/cloud/action/search/Sniffer;->sniffer_id:I

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ")"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Lcom/xunlei/cloud/action/search/g;->e(Ljava/lang/String;)V

    .line 72
    :goto_0
    return-object v0

    .line 51
    :pswitch_0
    invoke-static {p1, p0}, Lcom/xunlei/cloud/action/search/g;->a(Lcom/xunlei/cloud/action/search/Sniffer;Ljava/lang/String;)Ljava/util/ArrayList;

    move-result-object v0

    goto :goto_0

    .line 55
    :pswitch_1
    invoke-static {p0}, Lcom/xunlei/cloud/action/search/g;->a(Ljava/lang/String;)Ljava/util/ArrayList;

    move-result-object v0

    goto :goto_0

    .line 59
    :pswitch_2
    invoke-static {p0}, Lcom/xunlei/cloud/action/search/g;->b(Ljava/lang/String;)Ljava/util/ArrayList;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v0

    goto :goto_0

    .line 67
    :catch_0
    move-exception v1

    .line 68
    invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0

    .line 49
    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_1
        :pswitch_2
    .end packed-switch
.end method

.method public static a(I)Z
    .locals 2
    .parameter

    .prologue
    .line 31
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    .line 37
    const/4 v1, 0x0

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 38
    const/4 v1, 0x1

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 39
    const/4 v1, 0x2

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 41
    invoke-static {p0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z

    move-result v0

    return v0
.end method

.method public static b(Ljava/lang/String;)Ljava/util/ArrayList;
    .locals 6
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            ")",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/xunlei/cloud/action/search/SnifferData;",
            ">;"
        }
    .end annotation

    .prologue
    .line 117
    new-instance v1, Ljava/util/ArrayList;

    invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V

    .line 119
    invoke-static {p0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_0

    move-object v0, v1

    .line 151
    :goto_0
    return-object v0

    .line 123
    :cond_0
    invoke-static {p0}, Lcom/xunlei/cloud/action/search/ZYSSResp;->newInstance(Ljava/lang/String;)Lcom/xunlei/cloud/action/search/ZYSSResp;

    move-result-object v2

    .line 125
    iget-object v0, v2, Lcom/xunlei/cloud/action/search/ZYSSResp;->data:Lcom/xunlei/cloud/action/search/ZIYSSMovieData;

    iget-object v0, v0, Lcom/xunlei/cloud/action/search/ZIYSSMovieData;->bt:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v3

    :goto_1
    invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-nez v0, :cond_2

    .line 134
    iget-object v0, v2, Lcom/xunlei/cloud/action/search/ZYSSResp;->data:Lcom/xunlei/cloud/action/search/ZIYSSMovieData;

    iget-object v0, v0, Lcom/xunlei/cloud/action/search/ZIYSSMovieData;->nodes:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :cond_1
    :goto_2
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-nez v0, :cond_3

    move-object v0, v1

    .line 151
    goto :goto_0

    .line 125
    :cond_2
    invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/xunlei/cloud/action/search/ZIYSSMovie;

    .line 126
    new-instance v4, Lcom/xunlei/cloud/action/search/SnifferData;

    invoke-direct {v4}, Lcom/xunlei/cloud/action/search/SnifferData;-><init>()V

    .line 127
    iget-object v5, v0, Lcom/xunlei/cloud/action/search/ZIYSSMovie;->title:Ljava/lang/String;

    iput-object v5, v4, Lcom/xunlei/cloud/action/search/SnifferData;->title:Ljava/lang/String;

    .line 128
    iget-object v5, v0, Lcom/xunlei/cloud/action/search/ZIYSSMovie;->url:Ljava/lang/String;

    iput-object v5, v4, Lcom/xunlei/cloud/action/search/SnifferData;->url:Ljava/lang/String;

    .line 129
    iget-object v5, v0, Lcom/xunlei/cloud/action/search/ZIYSSMovie;->size:Ljava/lang/String;

    iput-object v5, v4, Lcom/xunlei/cloud/action/search/SnifferData;->size:Ljava/lang/String;

    .line 130
    iget-object v0, v0, Lcom/xunlei/cloud/action/search/ZIYSSMovie;->url:Ljava/lang/String;

    invoke-static {v0}, Lcom/xunlei/cloud/action/search/g;->c(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, v4, Lcom/xunlei/cloud/action/search/SnifferData;->hash:Ljava/lang/String;

    .line 131
    invoke-virtual {v1, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_1

    .line 134
    :cond_3
    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/xunlei/cloud/action/search/ZIYSSMovie;

    .line 136
    iget v3, v0, Lcom/xunlei/cloud/action/search/ZIYSSMovie;->type:I

    const/16 v4, 0xf

    if-eq v3, v4, :cond_1

    .line 137
    new-instance v3, Lcom/xunlei/cloud/action/search/SnifferData;

    invoke-direct {v3}, Lcom/xunlei/cloud/action/search/SnifferData;-><init>()V

    .line 138
    iget-object v4, v0, Lcom/xunlei/cloud/action/search/ZIYSSMovie;->title:Ljava/lang/String;

    invoke-static {v4}, Landroid/net/Uri;->decode(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v3, Lcom/xunlei/cloud/action/search/SnifferData;->title:Ljava/lang/String;

    .line 139
    iget-object v4, v0, Lcom/xunlei/cloud/action/search/ZIYSSMovie;->url:Ljava/lang/String;

    iput-object v4, v3, Lcom/xunlei/cloud/action/search/SnifferData;->url:Ljava/lang/String;

    .line 140
    iget-object v4, v0, Lcom/xunlei/cloud/action/search/ZIYSSMovie;->size:Ljava/lang/String;

    iput-object v4, v3, Lcom/xunlei/cloud/action/search/SnifferData;->size:Ljava/lang/String;

    .line 141
    iget v4, v0, Lcom/xunlei/cloud/action/search/ZIYSSMovie;->type:I

    const/16 v5, 0xd

    if-ne v4, v5, :cond_4

    .line 142
    iget-object v0, v0, Lcom/xunlei/cloud/action/search/ZIYSSMovie;->url:Ljava/lang/String;

    invoke-static {v0}, Lcom/xunlei/cloud/action/search/g;->c(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, v3, Lcom/xunlei/cloud/action/search/SnifferData;->hash:Ljava/lang/String;

    .line 144
    :cond_4
    iget-object v0, v3, Lcom/xunlei/cloud/action/search/SnifferData;->title:Ljava/lang/String;

    if-eqz v0, :cond_5

    .line 145
    iget-object v0, v3, Lcom/xunlei/cloud/action/search/SnifferData;->title:Ljava/lang/String;

    const-string v4, "(\\r|\\n)"

    const-string v5, ""

    invoke-virtual {v0, v4, v5}, Ljava/lang/String;->replaceAll(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, v3, Lcom/xunlei/cloud/action/search/SnifferData;->title:Ljava/lang/String;

    .line 147
    :cond_5
    invoke-virtual {v1, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    goto :goto_2
.end method

.method public static c(Ljava/lang/String;)Ljava/lang/String;
    .locals 7
    .parameter

    .prologue
    const/4 v3, 0x0

    .line 155
    const/4 v1, 0x1

    const-string v2, "magnet:?xt=urn:btih:"

    const-string v5, "&"

    move-object v0, p0

    move v4, v3

    move v6, v3

    invoke-static/range {v0 .. v6}, Lcom/xunlei/cloud/action/search/g;->a(Ljava/lang/String;ZLjava/lang/String;ZZLjava/lang/String;Z)Ljava/lang/String;

    move-result-object v0

    .line 156
    return-object v0
.end method

.method public static d(Ljava/lang/String;)Ljava/lang/String;
    .locals 2
    .parameter

    .prologue
    .line 390
    :try_start_0
    const-string v0, "UTF-8"

    invoke-static {p0, v0}, Ljava/net/URLDecoder;->decode(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v0

    .line 396
    :goto_0
    return-object v0

    .line 392
    :catch_0
    move-exception v0

    .line 393
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    .line 395
    const-string v0, "%"

    const-string v1, ""

    invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;

    move-result-object v0

    goto :goto_0
.end method

.method private static e(Ljava/lang/String;)V
    .locals 1
    .parameter

    .prologue
    .line 384
    sget-object v0, Lcom/xunlei/cloud/action/search/g;->a:Lcom/xunlei/cloud/util/af;

    invoke-virtual {v0, p0}, Lcom/xunlei/cloud/util/af;->a(Ljava/lang/Object;)V

    .line 385
    return-void
.end method
